package com.lds.employment.service.impl;

import java.util.List;

import com.lds.employment.domain.dto.StudentAssistanceDto;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lds.employment.mapper.EmploymentStudentAssistanceMapper;
import com.lds.employment.domain.EmploymentStudentAssistance;
import com.lds.employment.service.IEmploymentStudentAssistanceService;

/**
 * 学生帮扶Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-05
 */
@Service
public class EmploymentStudentAssistanceServiceImpl implements IEmploymentStudentAssistanceService 
{
    @Autowired
    private EmploymentStudentAssistanceMapper employmentStudentAssistanceMapper;

    /**
     * 查询学生帮扶
     * 
     * @param id 学生帮扶主键
     * @return 学生帮扶
     */
    @Override
    public EmploymentStudentAssistance selectEmploymentStudentAssistanceById(Long id)
    {
        return employmentStudentAssistanceMapper.selectEmploymentStudentAssistanceById(id);
    }

    /**
     * 查询学生帮扶列表
     * 
     * @param employmentStudentAssistance 学生帮扶
     * @return 学生帮扶
     */
    @Override
    public List<EmploymentStudentAssistance> selectEmploymentStudentAssistanceList(EmploymentStudentAssistance employmentStudentAssistance)
    {
        return employmentStudentAssistanceMapper.selectEmploymentStudentAssistanceList(employmentStudentAssistance);
    }

    /**
     * 新增学生帮扶
     * 
     * @param employmentStudentAssistance 学生帮扶
     * @return 结果
     */
    @Override
    public int insertEmploymentStudentAssistance(EmploymentStudentAssistance employmentStudentAssistance)
    {
        employmentStudentAssistance.setCreateTime(DateUtils.getNowDate());
        return employmentStudentAssistanceMapper.insertEmploymentStudentAssistance(employmentStudentAssistance);
    }

    /**
     * 修改学生帮扶
     * 
     * @param employmentStudentAssistance 学生帮扶
     * @return 结果
     */
    @Override
    public int updateEmploymentStudentAssistance(EmploymentStudentAssistance employmentStudentAssistance)
    {
        return employmentStudentAssistanceMapper.updateEmploymentStudentAssistance(employmentStudentAssistance);
    }

    /**
     * 批量删除学生帮扶
     * 
     * @param ids 需要删除的学生帮扶主键
     * @return 结果
     */
    @Override
    public int deleteEmploymentStudentAssistanceByIds(Long[] ids)
    {
        return employmentStudentAssistanceMapper.deleteEmploymentStudentAssistanceByIds(ids);
    }

    /**
     * 删除学生帮扶信息
     * 
     * @param id 学生帮扶主键
     * @return 结果
     */
    @Override
    public int deleteEmploymentStudentAssistanceById(Long id)
    {
        return employmentStudentAssistanceMapper.deleteEmploymentStudentAssistanceById(id);
    }
}
